﻿#include "AMain.h"

namespace AutoPatcherAdmin
{

    FileInformation::FileInformation()
    {
        Creation = DateTime::Now;
    }

    FileInformation::FileInformation(BinaryReader *reader)
    {
        FileName = reader->ReadString();
        Length = reader->ReadInt32();
        Compressed = reader->ReadInt32();
        Creation = DateTime::FromBinary(reader->ReadInt64());
    }

    void FileInformation::Save(BinaryWriter *writer)
    {
        writer->Write(FileName);
        writer->Write(Length);
        writer->Write(Compressed);
        writer->Write(Creation.ToBinary());
    }
}
